<tr {% if highlight %}class="table-light"{% endif %}>  
    <td>{{ transaction.transaction_date|date:"Y-m-d H:i" }}</td>  
    <td>  
        <a href="{% url 'transaction_detail' transaction.uuid %}" class="text-decoration-none text-dark" title="查看详情">  
            {{ transaction.name }}  
            {% if transaction.notes %}  
                <span class="badge bg-light text-dark" data-bs-toggle="tooltip" title="{{ transaction.notes }}">  
                    <i class="fas fa-sticky-note"></i>  
                </span>  
            {% endif %}  
        </a>  
    </td>  
    <td>  
        {% if transaction.category %}  
            <span class="badge bg-light text-dark">  
                <i class="fas fa-{{ transaction.category.icon|default:'tag' }} me-1"></i>  
                {{ transaction.category.name }}  
            </span>  
        {% else %}  
            <span class="text-muted small">无分类</span>  
        {% endif %}  
    </td>  
    <td>  
        <span class="badge bg-light text-dark">  
            <i class="fas fa-{{ transaction.wallet.icon }} me-1"></i>  
            {{ transaction.wallet.name }}  
        </span>  
    </td>  
    <td class="text-end {% if transaction.type == 'income' %}income-text{% else %}expense-text{% endif %}">  
        {% if transaction.type == 'income' %}+{% else %}-{% endif %}  
        ¥{{ transaction.amount|floatformat:2 }}  
    </td>  
    {% if show_actions %}  
    <td class="text-end">  
        <div class="btn-group btn-group-sm">  
            <a href="{% url 'transaction_edit' transaction.uuid %}" class="btn btn-outline-primary">  
                <i class="fas fa-edit"></i>  
            </a>  
            <a href="{% url 'transaction_delete' transaction.uuid %}" class="btn btn-outline-danger">  
                <i class="fas fa-trash"></i>  
            </a>  
        </div>  
    </td>  
    {% endif %}  
</tr>